import Vue from 'vue';
import Router from 'vue-router';
import httpAxios from '../api/http';
import axios from 'axios';
import VueResource from 'vue-resource';
Vue.use(VueResource);
Vue.http.options.credentials=true;
Vue.use(Router);
var route=new Router({
    routes: [
        {
            path: '/',
            redirect: '/homePage'
        },
        
        {
            path: '/homePage',
            component: resolve => require(['../components/common/Home2.vue'], resolve),
            children:[

                 {
                    path: '/',
                    component: resolve => require(['../components/page/home/homepage.vue'], resolve), 
                	meta: { keepAlive: false },
                },
               
                {
            		path: '/homePage',
                	component: resolve => require(['../components/page/home/homepage.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/recommend',
                	component: resolve => require(['../components/page/home/recommend.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/homeShare',
                	component: resolve => require(['../components/page/home/homeShare.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/homeShareDatil',
                	component: resolve => require(['../components/page/home/homeShareDatil.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                //良品
                {
            		path: '/liang',
                	component: resolve => require(['../components/page/liangpin/liang.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/liang/productDatil',
                	component: resolve => require(['../components/page/liangpin/productDatil.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/liang/productList',
                	component: resolve => require(['../components/page/liangpin/productList.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                //匠商
                {
            		path: '/jiang',
                	component: resolve => require(['../components/page/jiangshan/jiang.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/Jregister',
                	component: resolve => require(['../components/page/jiangshan/register.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/Jreturn',
                	component: resolve => require(['../components/page/jiangshan/registerReturn.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                //匠屋
                {
            		path: '/wode',
                	component: resolve => require(['../components/page/people/wode.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/ewm',
                	component: resolve => require(['../components/page/people/ewm.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/welfare',
                	component: resolve => require(['../components/page/people/welfare.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/register',
                	component: resolve => require(['../components/page/people/register.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/finance',
                	component: resolve => require(['../components/page/people/finance.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/orderData',
                	component: resolve => require(['../components/page/people/orderData.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/orderData2',
                	component: resolve => require(['../components/page/people/orderData2.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/ordercard',
                	component: resolve => require(['../components/page/people/ordercard.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/newCard',
                	component: resolve => require(['../components/page/people/newCard.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/yuan',
                	component: resolve => require(['../components/page/people/yuan.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/manage',
                	component: resolve => require(['../components/page/people/manage.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                {
            		path: '/wode/register2',
                	component: resolve => require(['../components/page/people/register2.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                //同城
                {
            		path: '/tong',
                	component: resolve => require(['../components/page/tong/tong.vue'], resolve), 
                	meta: { keepAlive: false }, 
                },
                
                

            ]
        },
    ]
})
route.beforeEach((to ,from ,next)=>{
	
    next();
})
export default route